<template>
  <div>
    <nav-bar></nav-bar>
    <img src="@/assets/banner_bg.png" alt="" class="banner_bg" />
    <user-detail :userModel="userModel"></user-detail>
  </div>
</template>

<script>
import NavBar from "../components/common/NavBar.vue";
import UserDetail from "../components/user/UserDetail.vue";
import { getInfo } from "@/utils/Api.js";
export default {
  components: { NavBar, UserDetail },
  data() {
    return {
      userModel: {},
    };
  },
  methods: {
    async userInfoData() {
      const INFO = await getInfo(
        "/user/" + JSON.parse(localStorage.getItem("id"))
      );
      this.userModel = INFO.data[0];
      // console.log("usermodel", this.userModel);
    },
  },

  created() {
    this.userInfoData();
  },
};
</script>

<style lang="less" scoped>
.banner_bg {
  width: 100%;
  height: 33.333vw;
}
</style>